package com.handydata.antifraud.ws.dap;

import java.util.Date;
import java.util.UUID;

import javax.annotation.PostConstruct;

import lombok.extern.slf4j.Slf4j;

import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.alibaba.fastjson.JSONObject;
import com.handydata.antifraud.annotation.Comment;
import com.handydata.antifraud.bo.dataBaiRongInfo.DataBaiRongInfoReqBO;
import com.handydata.antifraud.bo.datacalllogs.DataCallLogsReqBO;
import com.handydata.antifraud.common.constant.DataSourceCode;
import com.handydata.antifraud.service.DataBaiRongInfoService;
import com.handydata.antifraud.service.DataCallLogsService;
import com.handydata.antifraud.to.dap.BRSpecialListReqTO;
import com.handydata.antifraud.to.dap.BRSpecialListResTO;
import com.handydata.antifraud.util.DateUtil;
import com.handydata.antifraud.util.encrypt.Md5Utils;
import com.handydata.antifraud.ws.WsInvocationService;

/**
 * 百融特殊名单验证
 */
@Slf4j
@Service("bRSpecialListWsService")
@Comment("百融特殊名单验证")
public class BRSpecialListWsServiceImpl extends
		DataPlatformWsService<BRSpecialListReqTO, BRSpecialListResTO> implements
		WsInvocationService<BRSpecialListReqTO, BRSpecialListResTO> {

	@Autowired
	private DataCallLogsService dataCallLogsService;
	@Autowired
	private DataBaiRongInfoService dataBaiRongInfoService;

	@Override
	public BRSpecialListResTO query(BRSpecialListReqTO req) {
		log.info("百融特殊名单验证请求参数 {}", req);
		BRSpecialListResTO resTO = new BRSpecialListResTO();
		if (StringUtils.isEmpty(req.getIdCard())) {
			log.error("百融特殊名单验证参数校验 {}", "cid为空");
			resTO.setResCode("1111");
			resTO.setResMsg("百融特殊名单验证接口cid参数为空");
			return resTO;
		}
		if (StringUtils.isEmpty(req.getName())) {
			log.error("百融特殊名单验证参数校验 {}", "name为空");
			resTO.setResCode("1111");
			resTO.setResMsg("百融特殊名单验证接口name参数为空");
			return resTO;
		}
		if (StringUtils.isEmpty(req.getPhoneNum())) {
			log.error("百融特殊名单验证参数校验 {}", "phoneNum为空");
			resTO.setResCode("1111");
			resTO.setResMsg("百融特殊名单验证接口phone参数为空");
			return resTO;
		}
		this.dataType = DataSourceCode.BAI_RONG.getCode();
		long startDate = new Date().getTime();
//		handleRequestParam(req);
		try {
			resTO = executeQuery(req);
			long endDate = new Date().getTime();
			int aa = Integer.valueOf(String.valueOf((endDate - startDate)));
			DataCallLogsReqBO dataCallLogsReqBO = new DataCallLogsReqBO();
			dataCallLogsReqBO.setId(UUID.randomUUID().toString().replace("-", ""));
			dataCallLogsReqBO.setParams(JSONObject.toJSONString(req));
			dataCallLogsReqBO.setElapsed(aa);
			dataCallLogsReqBO.setWselapsed(aa);
			dataCallLogsReqBO.setId(UUID.randomUUID().toString().replace("-", ""));
			dataCallLogsReqBO.setOrderId(req.getOrderId());
			dataCallLogsReqBO.setDataType(DataSourceCode.BAI_RONG.getCode());
			dataCallLogsReqBO.setResult(resTO.getResData());
			dataCallLogsReqBO.setResCode(resTO.getResCode());
			dataCallLogsReqBO.setResMsg(resTO.getResMsg());
			dataCallLogsReqBO.setCreateTime(new Date());
			dataCallLogsReqBO.setUpdateTime(new Date());
			dataCallLogsService.createDataCallLogs(dataCallLogsReqBO);
		} catch (Exception e) {
			DataBaiRongInfoReqBO dataBaiRongInfoReqBO = new DataBaiRongInfoReqBO();
			dataBaiRongInfoReqBO.setOrderId(req.getOrderId());
			dataBaiRongInfoReqBO.setResCode("9999");
			dataBaiRongInfoReqBO.setResMsg("百融接口调用异常");
			dataBaiRongInfoReqBO.setCreateTime(new Date());
			dataBaiRongInfoService.createDataBaiRongInfo(dataBaiRongInfoReqBO);
			resTO.setResCode("9999");
			resTO.setResMsg("百融接口调用异常");
		}
		return resTO;
	}

	@Override
	protected String createQueryXml(BRSpecialListReqTO req) {
		StringBuilder xml = new StringBuilder();
		xml.append("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>");
		xml.append("<subatm>");
		xml.append("<application>GwBiz.Req</application>");
		xml.append("<version>1.0.0</version>");
		xml.append("<sendTime>").append(DateUtil.now14()).append("</sendTime>");
		xml.append("<transCode>101013</transCode>");
		xml.append("<channelId>").append(encryInfo.getChannelId()).append("</channelId>");
		xml.append("<channelOrderId>").append(DateUtil.now17()).append("</channelOrderId>");
		xml.append("<name>").append(Md5Utils.md5ToHexStr(req.getName())).append("</name>");
		xml.append("<cid>").append(Md5Utils.md5ToHexStr(req.getIdCard())).append("</cid>");
		xml.append("<phone>").append(Md5Utils.md5ToHexStr(req.getPhoneNum())).append("</phone>");
		xml.append("<contactsPhone>").append(req.getContactsPhone()).append("</contactsPhone>");
		xml.append("<yearRange>").append(req.getYearRange()).append("</yearRange>");
//		xml.append("<queryModule>ApplyLoanStr,SpecialList_c,FraudRelation_g,DebtRepayStress,ExecutionLimited,GrayListExpand</queryModule>");
		xml.append("<queryModule>SpecialList_c</queryModule>");
		xml.append("</subatm>");
		log.info("百融接口调用翰迪数据平台请求报文：{}", xml);
		req.setQueryXml(xml.toString());
		return xml.toString();
	}

	@Override
	protected BRSpecialListResTO parseResultAndSave(String resultXml, String orderId,	Date createDate) {
		log.info("调用百融特殊名单验证接口返回报文：{}", resultXml);
		BRSpecialListResTO resTO = new BRSpecialListResTO();
		JSONObject resObject = new JSONObject();
		// 百融数据入库
		DataBaiRongInfoReqBO dataBaiRongInfoReqBO = new DataBaiRongInfoReqBO();
		dataBaiRongInfoReqBO.setOrderId(orderId);
		try {
			// 解析xml，保存本地DB
			JSONObject jasonObject = JSONObject.parseObject(resultXml);
			if (null != jasonObject) {
				if ("0000".equals(jasonObject.get("resCode"))) {
					JSONObject resData = (JSONObject) jasonObject.get("resData");
					JSONObject flagJsonObject = (JSONObject) resData.get("Flag");
					// 百融入库参数
					dataBaiRongInfoReqBO.setResCode(jasonObject.getString("resCode"));
					dataBaiRongInfoReqBO.setResMsg(jasonObject.getString("resMsg"));
					dataBaiRongInfoReqBO.setFlag(resData.getString("Flag"));
					dataBaiRongInfoReqBO.setApplyLoanStr(resData.getString("ApplyLoanStr"));
					dataBaiRongInfoReqBO.setSpecialListC(resData.getString("SpecialList_c"));
					dataBaiRongInfoReqBO.setFraudRelationG(resData.getString("FraudRelation_g"));
					dataBaiRongInfoReqBO.setDebtRepayStress(resData.getString("DebtRepayStress"));
					dataBaiRongInfoReqBO.setExecutionLimited(resData.getString("ExecutionLimited"));
					dataBaiRongInfoReqBO.setGrayListExpand(resData.getString("GrayListExpand"));
					dataBaiRongInfoReqBO.setCreditModelEvaC(resData.getString("CreditModelEva_c"));
					
					// 特殊名单验证
					if (StringUtils.isNotBlank(flagJsonObject.getString("specialList_c")) &&
							flagJsonObject.getInteger("specialList_c") == 1) {
						JSONObject specialListC = (JSONObject) resData.get("SpecialList_c");
						if (specialListC.get("id") != null) {
							// id
							JSONObject idObject = (JSONObject) specialListC.get("id");
							if (idObject.get("court_bad") != null) {
								int brDishonestIdcard = idObject.getInteger("court_bad");//按身份证号查询法院失信人
								resObject.put("br_dishonest_idcard", brDishonestIdcard);
								resTO.setBrDishonestIdcard(brDishonestIdcard);
							} else {
								resObject.put("br_dishonest_idcard", "9999");
							}
							if (idObject.get("court_executed") != null) {
								int brEnforcedIdcard = idObject.getInteger("court_executed");//按身份证号查询法院被执行人
								resObject.put("br_enforced_idcard", brEnforcedIdcard);
								resTO.setBrEnforcedIdcard(brEnforcedIdcard);
							} else {
								resObject.put("br_enforced_idcard", "9999");
							}
							if (idObject.get("bank_fraud") != null) {
								int brIdBankFraud = idObject.getInteger("bank_fraud");//通过身份证号查询银行(含信用卡)资信不佳
								resObject.put("br_id_bank_fraud", brIdBankFraud);
								resTO.setBrIdBankFraud(brIdBankFraud);
							} else {
								resObject.put("br_id_bank_fraud", "9999");
							}
							if (idObject.get("bank_lost") != null) {
								int brIdBankLost = idObject.getInteger("bank_lost");//通过身份证号查询银行(含信用卡)高风险
								resObject.put("br_id_bank_lost", brIdBankLost);
								resTO.setBrIdBankLost(brIdBankLost);
							} else {
								resObject.put("br_id_bank_lost", "9999");
							}
							if (idObject.get("nbank_fraud") != null) {
								int brIdNbankFraud = idObject.getInteger("nbank_fraud");//通过身份证号查询非银(含全部非银类型)资信不佳
								resObject.put("br_id_nbank_fraud", brIdNbankFraud);
								resTO.setBrIdNbankFraud(brIdNbankFraud);
							} else {
								resObject.put("br_id_nbank_fraud", "9999");
							}
							if (idObject.get("nbank_lost") != null) {
								int brIdNbankLost = idObject.getInteger("nbank_lost");//通过身份证号查询非银(含全部非银类型)高风险
								resObject.put("br_id_nbank_lost", brIdNbankLost);
								resTO.setBrIdNbankLost(brIdNbankLost);
							} else {
								resObject.put("br_id_nbank_lost", "9999");
							} 
							if (idObject.get("nbank_nsloan_fraud") != null) {
								int brIdNbankNsloanFraud = idObject.getInteger("nbank_nsloan_fraud");//通过身份证号查询非银-持牌网络小贷资信不佳
								resObject.put("br_id_nbank_nsloan_fraud", brIdNbankNsloanFraud);
								resTO.setBrIdNbankNsloanFraud(brIdNbankNsloanFraud);
							} else {
								resObject.put("br_id_nbank_nsloan_fraud", "9999");
							}
							if (idObject.get("nbank_nsloan_lost") != null) {
								int brIdNbankNsloanLost = idObject.getInteger("nbank_nsloan_lost");//通过身份证号查询非银-持牌网络小贷高风险
								resObject.put("br_id_nbank_nsloan_lost", brIdNbankNsloanLost);
								resTO.setBrIdNbankNsloanLost(brIdNbankNsloanLost);
							} else {
								resObject.put("br_id_nbank_nsloan_lost", "9999");
							}
							if (idObject.get("nbank_sloan_fraud") != null) {
								int brIdNbankSloanFraud = idObject.getInteger("nbank_sloan_fraud");//通过身份证号查询非银-持牌小贷资信不佳
								resObject.put("br_id_nbank_sloan_fraud", brIdNbankSloanFraud);
								resTO.setBrIdNbankSloanFraud(brIdNbankSloanFraud);
							} else {
								resObject.put("br_id_nbank_sloan_fraud", "9999");
							}
							if (idObject.get("nbank_sloan_lost") != null) {
								int brIdNbankSloanLost = idObject.getInteger("nbank_sloan_lost");//通过身份证号查询非银-持牌小贷高风险
								resObject.put("br_id_nbank_sloan_lost", brIdNbankSloanLost);
								resTO.setBrIdNbankSloanLost(brIdNbankSloanLost);
							} else {
								resObject.put("br_id_nbank_sloan_lost", "9999");
							}
							if (idObject.get("nbank_cons_fraud") != null) {
								int brIdNbankConsFraud = idObject.getInteger("nbank_cons_fraud");//通过身份证号查询非银-持牌消费金融资信不佳
								resObject.put("br_id_nbank_cons_fraud", brIdNbankConsFraud);
								resTO.setBrIdNbankConsFraud(brIdNbankConsFraud);
							} else {
								resObject.put("br_id_nbank_cons_fraud", "9999");
							}
							if (idObject.get("nbank_cons_lost") != null) {
								int brIdNbankConsLost = idObject.getInteger("nbank_cons_lost");//通过身份证号查询非银-持牌消费金融高风险
								resObject.put("br_id_nbank_cons_lost", brIdNbankConsLost);
								resTO.setBrIdNbankConsLost(brIdNbankConsLost);
							} else {
								resObject.put("br_id_nbank_cons_lost", "9999");
							}
							if (idObject.get("nbank_finlea_fraud") != null) {
								int brIdNbankFinleaFraud = idObject.getInteger("nbank_finlea_fraud");//通过身份证号查询非银-持牌融资租赁资信不佳
								resObject.put("br_id_nbank_finlea_fraud", brIdNbankFinleaFraud);
								resTO.setBrIdNbankFinleaFraud(brIdNbankFinleaFraud);
							} else {
								resObject.put("br_id_nbank_finlea_fraud", "9999");
							}
							if (idObject.get("nbank_finlea_lost") != null) {
								int brIdNbankFinleaLost = idObject.getInteger("nbank_finlea_lost");//通过身份证号查询非银-持牌融资租赁高风险
								resObject.put("br_id_nbank_finlea_lost", brIdNbankFinleaLost);
								resTO.setBrIdNbankFinleaLost(brIdNbankFinleaLost);
							} else {
								resObject.put("br_id_nbank_finlea_lost", "9999");
							}
							if (idObject.get("nbank_autofin_fraud") != null) {
								int brIdNbankAutofinFraud = idObject.getInteger("nbank_autofin_fraud");//通过身份证号查询非银-持牌汽车金融资信不佳
								resObject.put("br_id_nbank_autofin_fraud", brIdNbankAutofinFraud);
								resTO.setBrIdNbankAutofinFraud(brIdNbankAutofinFraud);
							} else {
								resObject.put("br_id_nbank_autofin_fraud", "9999");
							}
							if (idObject.get("nbank_autofin_lost") != null) {
								int brIdNbankAutofinLost = idObject.getInteger("nbank_autofin_lost");//通过身份证号查询非银-持牌汽车金融高风险
								resObject.put("br_id_nbank_autofin_lost", brIdNbankAutofinLost);
								resTO.setBrIdNbankAutofinLost(brIdNbankAutofinLost);
							} else {
								resObject.put("br_id_nbank_autofin_lost", "9999");
							}
							if (idObject.get("nbank_other_fraud") != null) {
								int brIdNbankOtherFraud = idObject.getInteger("nbank_other_fraud");//通过身份证号查询非银-其他资信不佳
								resObject.put("br_id_nbank_other_fraud", brIdNbankOtherFraud);
								resTO.setBrIdNbankOtherFraud(brIdNbankOtherFraud);
							} else {
								resObject.put("br_id_nbank_other_fraud", "9999");
							}
							if (idObject.get("nbank_other_lost") != null) {
								int brIdNbankOtherLost = idObject.getInteger("nbank_other_lost");//通过身份证号查询非银-其他高风险
								resObject.put("br_id_nbank_other_lost", brIdNbankOtherLost);
								resTO.setBrIdNbankOtherLost(brIdNbankOtherLost);
							} else {
								resObject.put("br_id_nbank_other_lost", "9999");
							}
						} else {
							resObject.put("br_dishonest_idcard", "9999");
							resObject.put("br_enforced_idcard", "9999");
							resObject.put("br_id_bank_fraud", "9999");
							resObject.put("br_id_bank_lost", "9999");
							resObject.put("br_id_nbank_fraud", "9999");
							resObject.put("br_id_nbank_lost", "9999");
							resObject.put("br_id_nbank_nsloan_fraud", "9999");
							resObject.put("br_id_nbank_nsloan_lost", "9999");
							resObject.put("br_id_nbank_sloan_fraud", "9999");
							resObject.put("br_id_nbank_sloan_lost", "9999");
							resObject.put("br_id_nbank_cons_fraud", "9999");
							resObject.put("br_id_nbank_cons_lost", "9999");
							resObject.put("br_id_nbank_finlea_fraud", "9999");
							resObject.put("br_id_nbank_finlea_lost", "9999");
							resObject.put("br_id_nbank_autofin_fraud", "9999");
							resObject.put("br_id_nbank_autofin_lost", "9999");
							resObject.put("br_id_nbank_other_fraud", "9999");
							resObject.put("br_id_nbank_other_lost", "9999");
						}
						// cell
						if (specialListC.get("cell") != null) {
							JSONObject cellObject = (JSONObject) specialListC.get("cell");
							if (cellObject.get("bank_fraud") != null) {
								int brCellBankFraud = cellObject.getInteger("bank_fraud");//通过手机号查询银行(含信用卡)资信不佳
								resObject.put("br_cell_bank_fraud", brCellBankFraud);
								resTO.setBrCellBankFraud(brCellBankFraud);
							} else {
								resObject.put("br_cell_bank_fraud", "9999");
							}
							if (cellObject.get("bank_lost") != null) {
								int brCellBankLost = cellObject.getInteger("bank_lost");//通过手机号查询银行(含信用卡)高风险
								resObject.put("br_cell_bank_lost", brCellBankLost);
								resTO.setBrCellBankLost(brCellBankLost);
							} else {
								resObject.put("br_cell_bank_lost", "9999");
							}
							if (cellObject.get("nbank_fraud") != null) {
								int brCellNbankFraud = cellObject.getInteger("nbank_fraud");//通过手机号查询非银(含全部非银类型)资信不佳
								resObject.put("br_cell_nbank_fraud", brCellNbankFraud);
								resTO.setBrCellNbankFraud(brCellNbankFraud);
							} else {
								resObject.put("br_cell_nbank_fraud", "9999");
							}
							if (cellObject.get("nbank_lost") != null) {
								int brCellNbankLost = cellObject.getInteger("nbank_lost");//通过手机号查询非银(含全部非银类型)高风险
								resObject.put("br_cell_nbank_lost", brCellNbankLost);
								resTO.setBrCellNbankLost(brCellNbankLost);
							} else {
								resObject.put("br_cell_nbank_lost", "9999");
							}
							if (cellObject.get("nbank_nsloan_fraud") != null) {
								int brCellNbankNsloanFraud = cellObject.getInteger("nbank_nsloan_fraud");//通过手机号查询非银-持牌网络小贷资信不佳
								resObject.put("br_cell_nbank_nsloan_fraud", brCellNbankNsloanFraud);
								resTO.setBrCellNbankNsloanFraud(brCellNbankNsloanFraud);
							} else {
								resObject.put("br_cell_nbank_nsloan_fraud", "9999");
							}
							if (cellObject.get("nbank_nsloan_lost") != null) {
								int brCellNbankNsloanLost = cellObject.getInteger("nbank_nsloan_lost");//通过手机号查询非银-持牌网络小贷高风险
								resObject.put("br_cell_nbank_nsloan_lost", brCellNbankNsloanLost);
								resTO.setBrCellNbankNsloanLost(brCellNbankNsloanLost);
							} else {
								resObject.put("br_cell_nbank_nsloan_lost", "9999");
							}
							if (cellObject.get("nbank_sloan_fraud") != null) {
								int brCellNbankSloanFraud = cellObject.getInteger("nbank_sloan_fraud");//通过手机号查询非银-持牌小贷资信不佳
								resObject.put("br_cell_nbank_sloan_fraud", brCellNbankSloanFraud);
								resTO.setBrCellNbankSloanFraud(brCellNbankSloanFraud);
							} else {
								resObject.put("br_cell_nbank_sloan_fraud", "9999");
							}
							if (cellObject.get("nbank_sloan_lost") != null) {
								int brCellNbankSloanLost = cellObject.getInteger("nbank_sloan_lost");//通过手机号查询非银-持牌小贷高风险
								resObject.put("br_cell_nbank_sloan_lost", brCellNbankSloanLost);
								resTO.setBrCellNbankSloanLost(brCellNbankSloanLost);
							} else {
								resObject.put("br_cell_nbank_sloan_lost", "9999");
							}
							if (cellObject.get("nbank_cons_fraud") != null) {
								int brCellNbankConsFraud = cellObject.getInteger("nbank_cons_fraud");//通过手机号查询非银-持牌消费金融资信不佳
								resObject.put("br_cell_nbank_cons_fraud", brCellNbankConsFraud);
								resTO.setBrCellNbankConsFraud(brCellNbankConsFraud);
							} else {
								resObject.put("br_cell_nbank_cons_fraud", "9999");
							}
							if (cellObject.get("nbank_cons_lost") != null) {
								int brCellNbankConsLost = cellObject.getInteger("nbank_cons_lost");//通过手机号查询非银-持牌消费金融高风险
								resObject.put("br_cell_nbank_cons_lost", brCellNbankConsLost);
								resTO.setBrCellNbankConsLost(brCellNbankConsLost);
							} else {
								resObject.put("br_cell_nbank_cons_lost", "9999");
							}
							if (cellObject.get("nbank_finlea_fraud") != null) {
								int brCellNbankFinleaFraud = cellObject.getInteger("nbank_finlea_fraud");//通过手机号查询非银-持牌融资租赁资信不佳
								resObject.put("br_cell_nbank_finlea_fraud", brCellNbankFinleaFraud);
								resTO.setBrCellNbankFinleaFraud(brCellNbankFinleaFraud);
							} else {
								resObject.put("br_cell_nbank_finlea_fraud", "9999");
							}
							if (cellObject.get("nbank_finlea_lost") != null) {
								int brCellNbankFinleaLost = cellObject.getInteger("nbank_finlea_lost");//通过手机号查询非银-持牌融资租赁高风险
								resObject.put("br_cell_nbank_finlea_lost", brCellNbankFinleaLost);
								resTO.setBrCellNbankFinleaLost(brCellNbankFinleaLost);
							} else {
								resObject.put("br_cell_nbank_finlea_lost", "9999");
							}
							if (cellObject.get("nbank_autofin_fraud") != null) {
								int brCellNbankAutofinFraud = cellObject.getInteger("nbank_autofin_fraud");//通过手机号查询非银-持牌汽车金融资信不佳
								resObject.put("br_cell_nbank_autofin_fraud", brCellNbankAutofinFraud);
								resTO.setBrCellNbankAutofinFraud(brCellNbankAutofinFraud);
							} else {
								resObject.put("br_cell_nbank_autofin_fraud", "9999");
							}
							if (cellObject.get("nbank_autofin_lost") != null) {
								int brCellNbankAutofinLost = cellObject.getInteger("nbank_autofin_lost");//通过手机号查询非银-持牌汽车金融高风险
								resObject.put("br_cell_nbank_autofin_lost", brCellNbankAutofinLost);
								resTO.setBrCellNbankAutofinLost(brCellNbankAutofinLost);
							} else {
								resObject.put("br_cell_nbank_autofin_lost", "9999");
							}
							if (cellObject.get("nbank_other_fraud") != null) {
								int brCellNbankOtherFraud = cellObject.getInteger("nbank_other_fraud");//通过手机号查询非银-其他资信不佳
								resObject.put("br_cell_nbank_other_fraud", brCellNbankOtherFraud);
								resTO.setBrCellNbankOtherFraud(brCellNbankOtherFraud);
							} else {
								resObject.put("br_cell_nbank_other_fraud", "9999");
							}
							if (cellObject.get("nbank_other_lost") != null) {
								int brCellNbankOtherLost = cellObject.getInteger("nbank_other_lost");//通过手机号查询非银-其他高风险
								resObject.put("br_cell_nbank_other_lost", brCellNbankOtherLost);
								resTO.setBrCellNbankOtherLost(brCellNbankOtherLost);
							} else {
								resObject.put("br_cell_nbank_other_lost", "9999");
							}
						} else {
							resObject.put("br_cell_bank_fraud", "9999");
							resObject.put("br_cell_bank_lost", "9999");
							resObject.put("br_cell_nbank_fraud", "9999");
							resObject.put("br_cell_nbank_lost", "9999");
							resObject.put("br_cell_nbank_nsloan_fraud", "9999");
							resObject.put("br_cell_nbank_nsloan_lost", "9999");
							resObject.put("br_cell_nbank_sloan_fraud", "9999");
							resObject.put("br_cell_nbank_sloan_lost", "9999");
							resObject.put("br_cell_nbank_cons_fraud", "9999");
							resObject.put("br_cell_nbank_cons_lost", "9999");
							resObject.put("br_cell_nbank_finlea_fraud", "9999");
							resObject.put("br_cell_nbank_finlea_lost", "9999");
							resObject.put("br_cell_nbank_autofin_fraud", "9999");
							resObject.put("br_cell_nbank_autofin_lost", "9999");
							resObject.put("br_cell_nbank_other_fraud", "9999");
							resObject.put("br_cell_nbank_other_lost", "9999");
						}
						if (specialListC.get("cell") != null && specialListC.get("id") != null) {
							JSONObject idObject = (JSONObject) specialListC.get("id");
							JSONObject cellObject = (JSONObject) specialListC.get("cell");
							// 查询银行(含信用卡)中风险命中次数
							int brBankBadAllnum = 9999;
							if (StringUtils.isNotEmpty(idObject.getString("bank_bad_allnum")) &&
									StringUtils.isNotEmpty(cellObject.getString("bank_bad_allnum"))) {
								int brIdBankBadAllnum = Integer.parseInt(idObject.getString("bank_bad_allnum"));
								int brCellBankBadAllnum = Integer.parseInt(cellObject.getString("bank_bad_allnum"));
								brBankBadAllnum = Math.max(brIdBankBadAllnum, brCellBankBadAllnum);
								resObject.put("br_bank_bad_allnum", brBankBadAllnum);
							} else {
								resObject.put("br_bank_bad_allnum", "9999");
							}
							resObject.put("sl_id_bank_bad_allnum", idObject.getString("bank_bad_allnum"));
							resObject.put("sl_cell_bank_bad_allnum", cellObject.getString("bank_bad_allnum"));
							resTO.setBrBankBadAllnum(brBankBadAllnum);
							// 查询非银(含全部非银类型)中风险命中次数
							int brNbankBadAllnum = 9999;
							if (StringUtils.isNotEmpty(idObject.getString("nbank_bad_allnum")) &&
									StringUtils.isNotEmpty(cellObject.getString("nbank_bad_allnum"))) {
								int brIdNbnkBadAllnum = Integer.parseInt(idObject.getString("nbank_bad_allnum"));
								int brCellNbankBadAllnum = Integer.parseInt(cellObject.getString("nbank_bad_allnum"));
								brNbankBadAllnum = Math.max(brIdNbnkBadAllnum, brCellNbankBadAllnum);
								resObject.put("br_nbank_bad_allnum", brNbankBadAllnum);	
							} else {
								resObject.put("br_nbank_bad_allnum", "9999");	
							}
							resObject.put("sl_id_nbank_bad_allnum", idObject.getString("nbank_bad_allnum"));
							resObject.put("sl_cell_nbank_bad_allnum", cellObject.getString("nbank_bad_allnum"));
							resTO.setBrNbankBadAllnum(brNbankBadAllnum);
							// 查询非银-持牌网络小贷中风险命中次数
							int brNbankNsloanBadAllnum = 9999;
							if (StringUtils.isNotEmpty(idObject.getString("nbank_nsloan_bad_allnum")) &&
									StringUtils.isNotEmpty(cellObject.getString("nbank_nsloan_bad_allnum"))) {
								int brIdNbankNsloanBadAllnum = Integer.parseInt(idObject.getString("nbank_nsloan_bad_allnum"));
								int brCellNbankNsloanBadAllnum = Integer.parseInt(cellObject.getString("nbank_nsloan_bad_allnum"));
								brNbankNsloanBadAllnum = Math.max(brIdNbankNsloanBadAllnum, brCellNbankNsloanBadAllnum);
								resObject.put("br_nbank_nsloan_bad_allnum", brNbankNsloanBadAllnum);
							} else {
								resObject.put("br_nbank_nsloan_bad_allnum", "9999");
							}
							resObject.put("sl_id_nbank_nsloan_bad_allnum", idObject.getString("nbank_nsloan_bad_allnum"));
							resObject.put("sl_cell_nbank_nsloan_bad_allnum", cellObject.getString("nbank_nsloan_bad_allnum"));
							resTO.setBrNbankNsloanBadAllnum(brNbankNsloanBadAllnum);
							// 查询非银-持牌小贷中风险命中次数
							int brNbankSloanBadAllnum = 9999;
							if (StringUtils.isNotEmpty(idObject.getString("nbank_sloan_bad_allnum")) &&
									StringUtils.isNotEmpty(cellObject.getString("nbank_sloan_bad_allnum"))) {
								int brIdNbankSloanBadAllnum = Integer.parseInt(idObject.getString("nbank_sloan_bad_allnum"));
								int brCellNbankSloanBadAllnum = Integer.parseInt(cellObject.getString("nbank_sloan_bad_allnum"));
								brNbankSloanBadAllnum = Math.max(brIdNbankSloanBadAllnum, brCellNbankSloanBadAllnum);
								resObject.put("br_nbank_sloan_bad_allnum", brNbankSloanBadAllnum);
							} else {
								resObject.put("br_nbank_sloan_bad_allnum", "9999");
							}
							resObject.put("sl_id_nbank_nsloan_bad_allnum", idObject.getString("nbank_nsloan_bad_allnum"));
							resObject.put("sl_cell_nbank_nsloan_bad_allnum", cellObject.getString("nbank_nsloan_bad_allnum"));
							resTO.setBrNbankSloanBadAllnum(brNbankSloanBadAllnum);
							// 查询非银-持牌消费金融中风险命中次数
							int brNbankConsBadAllnum = 9999;
							if (StringUtils.isNotEmpty(idObject.getString("nbank_cons_bad_allnum")) &&
									StringUtils.isNotEmpty(cellObject.getString("nbank_cons_bad_allnum"))) {
								int brIdNbankConsBadAllnum = Integer.parseInt(idObject.getString("nbank_cons_bad_allnum"));
								int brCellNbankConsBadAllnum = Integer.parseInt(cellObject.getString("nbank_cons_bad_allnum"));
								brNbankConsBadAllnum = Math.max(brIdNbankConsBadAllnum, brCellNbankConsBadAllnum);
								resObject.put("br_nbank_cons_bad_allnum", brNbankConsBadAllnum);
							} else {
								resObject.put("br_nbank_cons_bad_allnum", "9999");
							}
							resObject.put("sl_id_nbank_cons_bad_allnum", idObject.getString("nbank_cons_bad_allnum"));
							resObject.put("sl_cell_nbank_cons_bad_allnum", cellObject.getString("nbank_cons_bad_allnum"));
							resTO.setBrNbankConsBadAllnum(brNbankConsBadAllnum);
							// 查询非银-持牌融资租赁中风险命中次数
							int brNbankFinleaBadAllnum = 9999;
							if (StringUtils.isNotEmpty(idObject.getString("nbank_finlea_bad_allnum")) &&
									StringUtils.isNotEmpty(cellObject.getString("nbank_finlea_bad_allnum"))) {
								int brIdNbankFinleaBadAllnum = Integer.parseInt(idObject.getString("nbank_finlea_bad_allnum"));
								int brCellNbankFinleaBadAllnum = Integer.parseInt(cellObject.getString("nbank_finlea_bad_allnum"));
								brNbankFinleaBadAllnum = Math.max(brIdNbankFinleaBadAllnum, brCellNbankFinleaBadAllnum);
								resObject.put("br_nbank_finlea_bad_allnum", brNbankFinleaBadAllnum);
							} else {
								resObject.put("br_nbank_finlea_bad_allnum", "9999");
							}
							resObject.put("sl_id_nbank_finlea_bad_allnum", idObject.getString("nbank_finlea_bad_allnum"));
							resObject.put("sl_cell_nbank_finlea_bad_allnum", cellObject.getString("nbank_finlea_bad_allnum"));
							resTO.setBrNbankFinleaBadAllnum(brNbankFinleaBadAllnum);
							// 查询非银-持牌汽车金融中风险命中次数
							int brNbankAutofinBadAllnum = 9999;
							if (StringUtils.isNotEmpty(idObject.getString("nbank_autofin_bad_allnum")) &&
									StringUtils.isNotEmpty(cellObject.getString("nbank_autofin_bad_allnum"))) {
								int brIdNbankAutofinBadAllnum = Integer.parseInt(idObject.getString("nbank_autofin_bad_allnum"));
								int brCellNbankAutofinBadAllnum = Integer.parseInt(cellObject.getString("nbank_autofin_bad_allnum"));
								brNbankAutofinBadAllnum = Math.max(brIdNbankAutofinBadAllnum, brCellNbankAutofinBadAllnum);
								resObject.put("br_nbank_autofin_bad_allnum", brNbankAutofinBadAllnum);
							} else {
								resObject.put("br_nbank_autofin_bad_allnum", "9999");
							}
							resObject.put("sl_id_nbank_autofin_bad_allnum", idObject.getString("nbank_autofin_bad_allnum"));
							resObject.put("sl_cell_nbank_autofin_bad_allnum", cellObject.getString("nbank_autofin_bad_allnum"));
							resTO.setBrNbankAutofinBadAllnum(brNbankAutofinBadAllnum);
							// 查询非银-其他中风险命中次数
							int brNbankOtherBadAllnum = 9999;
							if (StringUtils.isNotEmpty(idObject.getString("nbank_other_bad_allnum")) &&
									StringUtils.isNotEmpty(cellObject.getString("nbank_other_bad_allnum"))) {
								int brIdNbankOtherBadAllnum = Integer.parseInt(idObject.getString("nbank_other_bad_allnum"));
								int brCellNbankOtherBadAllnum = Integer.parseInt(cellObject.getString("nbank_other_bad_allnum"));
								brNbankOtherBadAllnum = Math.max(brIdNbankOtherBadAllnum, brCellNbankOtherBadAllnum);
								resObject.put("br_nbank_other_bad_allnum", brNbankOtherBadAllnum);
							} else {
								resObject.put("br_nbank_other_bad_allnum", "9999");
							}
							resObject.put("sl_id_nbank_other_bad_allnum", idObject.getString("nbank_other_bad_allnum"));
							resObject.put("sl_cell_nbank_other_bad_allnum", cellObject.getString("nbank_other_bad_allnum"));
							resTO.setBrNbankOtherBadAllnum(brNbankOtherBadAllnum);
							// 查询法院失信人命中次数
							if (StringUtils.isNotEmpty(idObject.getString("court_bad_allnum"))) {
								int brCourtBadAllnum = Integer.parseInt(idObject.getString("court_bad_allnum"));
								resTO.setBrCourtBadAllnum(brCourtBadAllnum);
								resObject.put("br_court_bad_allnum", idObject.getString("court_bad_allnum"));
							} else {
								resObject.put("br_court_bad_allnum", "9999");
							}
							// 查询法院被执行人命中次数
							if (StringUtils.isNotEmpty(idObject.getString("court_executed_allnum"))) {
								int brCourtExecutedAllnum = Integer.parseInt(idObject.getString("court_executed_allnum"));
								resTO.setBrCourtExecutedAllnum(brCourtExecutedAllnum);
								resObject.put("br_court_executed_allnum", idObject.getString("court_executed_allnum"));
							} else {
								resObject.put("br_court_executed_allnum", "9999");
							}
						}
						// 查询公安信息异常命中次数  （数据源接口无返回）br_bad_info_allnum
					} else {
						resObject.put("br_dishonest_idcard", "9999");
						resObject.put("br_enforced_idcard", "9999");
						resObject.put("br_id_bank_fraud", "9999");
						resObject.put("br_id_bank_lost", "9999");
						resObject.put("br_id_nbank_fraud", "9999");
						resObject.put("br_id_nbank_lost", "9999");
						resObject.put("br_id_nbank_nsloan_fraud", "9999");
						resObject.put("br_id_nbank_nsloan_lost", "9999");
						resObject.put("br_id_nbank_sloan_fraud", "9999");
						resObject.put("br_id_nbank_sloan_lost", "9999");
						resObject.put("br_id_nbank_cons_fraud", "9999");
						resObject.put("br_id_nbank_cons_lost", "9999");
						resObject.put("br_id_nbank_finlea_fraud", "9999");
						resObject.put("br_id_nbank_finlea_lost", "9999");
						resObject.put("br_id_nbank_autofin_fraud", "9999");
						resObject.put("br_id_nbank_autofin_lost", "9999");
						resObject.put("br_id_nbank_other_fraud", "9999");
						resObject.put("br_id_nbank_other_lost", "9999");
						resObject.put("br_cell_bank_fraud", "9999");
						resObject.put("br_cell_bank_lost", "9999");
						resObject.put("br_cell_nbank_fraud", "9999");
						resObject.put("br_cell_nbank_lost", "9999");
						resObject.put("br_cell_nbank_nsloan_fraud", "9999");
						resObject.put("br_cell_nbank_nsloan_lost", "9999");
						resObject.put("br_cell_nbank_sloan_fraud", "9999");
						resObject.put("br_cell_nbank_sloan_lost", "9999");
						resObject.put("br_cell_nbank_cons_fraud", "9999");
						resObject.put("br_cell_nbank_cons_lost", "9999");
						resObject.put("br_cell_nbank_finlea_fraud", "9999");
						resObject.put("br_cell_nbank_finlea_lost", "9999");
						resObject.put("br_cell_nbank_autofin_fraud", "9999");
						resObject.put("br_cell_nbank_autofin_lost", "9999");
						resObject.put("br_cell_nbank_other_fraud", "9999");
						resObject.put("br_cell_nbank_other_lost", "9999");
						resObject.put("br_bank_bad_allnum", "9999");
						resObject.put("br_nbank_bad_allnum", "9999");
						resObject.put("br_nbank_nsloan_bad_allnum", "9999");
						resObject.put("br_nbank_sloan_bad_allnum", "9999");
						resObject.put("br_nbank_cons_bad_allnum", "9999");
						resObject.put("br_nbank_finlea_bad_allnum", "9999");
						resObject.put("br_nbank_autofin_bad_allnum", "9999");
						resObject.put("br_nbank_other_bad_allnum", "9999");
						resObject.put("br_court_bad_allnum", "9999");
						resObject.put("br_court_executed_allnum", "9999");
					}
				} else {
					// 百融入库数据
					dataBaiRongInfoReqBO.setResCode(jasonObject.getString("resCode"));
					dataBaiRongInfoReqBO.setResMsg(jasonObject.getString("resMsg"));
					
					resObject.put("br_dishonest_idcard", "9999");
					resObject.put("br_enforced_idcard", "9999");
					resObject.put("br_id_bank_fraud", "9999");
					resObject.put("br_id_bank_lost", "9999");
					resObject.put("br_id_nbank_fraud", "9999");
					resObject.put("br_id_nbank_lost", "9999");
					resObject.put("br_id_nbank_nsloan_fraud", "9999");
					resObject.put("br_id_nbank_nsloan_lost", "9999");
					resObject.put("br_id_nbank_sloan_fraud", "9999");
					resObject.put("br_id_nbank_sloan_lost", "9999");
					resObject.put("br_id_nbank_cons_fraud", "9999");
					resObject.put("br_id_nbank_cons_lost", "9999");
					resObject.put("br_id_nbank_finlea_fraud", "9999");
					resObject.put("br_id_nbank_finlea_lost", "9999");
					resObject.put("br_id_nbank_autofin_fraud", "9999");
					resObject.put("br_id_nbank_autofin_lost", "9999");
					resObject.put("br_id_nbank_other_fraud", "9999");
					resObject.put("br_id_nbank_other_lost", "9999");
					resObject.put("br_cell_bank_fraud", "9999");
					resObject.put("br_cell_bank_lost", "9999");
					resObject.put("br_cell_nbank_fraud", "9999");
					resObject.put("br_cell_nbank_lost", "9999");
					resObject.put("br_cell_nbank_nsloan_fraud", "9999");
					resObject.put("br_cell_nbank_nsloan_lost", "9999");
					resObject.put("br_cell_nbank_sloan_fraud", "9999");
					resObject.put("br_cell_nbank_sloan_lost", "9999");
					resObject.put("br_cell_nbank_cons_fraud", "9999");
					resObject.put("br_cell_nbank_cons_lost", "9999");
					resObject.put("br_cell_nbank_finlea_fraud", "9999");
					resObject.put("br_cell_nbank_finlea_lost", "9999");
					resObject.put("br_cell_nbank_autofin_fraud", "9999");
					resObject.put("br_cell_nbank_autofin_lost", "9999");
					resObject.put("br_cell_nbank_other_fraud", "9999");
					resObject.put("br_cell_nbank_other_lost", "9999");
					resObject.put("br_bank_bad_allnum", "9999");
					resObject.put("br_nbank_bad_allnum", "9999");
					resObject.put("br_nbank_nsloan_bad_allnum", "9999");
					resObject.put("br_nbank_sloan_bad_allnum", "9999");
					resObject.put("br_nbank_cons_bad_allnum", "9999");
					resObject.put("br_nbank_finlea_bad_allnum", "9999");
					resObject.put("br_nbank_autofin_bad_allnum", "9999");
					resObject.put("br_nbank_other_bad_allnum", "9999");
					resObject.put("br_court_bad_allnum", "9999");
					resObject.put("br_court_executed_allnum", "9999");
				}
				resTO.setResCode((String) jasonObject.get("resCode"));
				resTO.setResMsg((String) jasonObject.get("resMsg"));
			} else {
				// 百融入库参数
				dataBaiRongInfoReqBO.setResCode("9999");
				dataBaiRongInfoReqBO.setResMsg("百融接口返回数据异常");
				
                resObject.put("br_fst_id_bank_inteday", "9999");
				resObject.put("br_debtscore", "9999");
				resObject.put("br_frg_level", "9999");
				resObject.put("br_dishonest_idcard", "9999");
				resObject.put("br_enforced_idcard", "9999");
				resObject.put("br_id_bank_fraud", "9999");
				resObject.put("br_id_bank_lost", "9999");
				resObject.put("br_id_nbank_fraud", "9999");
				resObject.put("br_id_nbank_lost", "9999");
				resObject.put("br_id_nbank_nsloan_fraud", "9999");
				resObject.put("br_id_nbank_nsloan_lost", "9999");
				resObject.put("br_id_nbank_sloan_fraud", "9999");
				resObject.put("br_id_nbank_sloan_lost", "9999");
				resObject.put("br_id_nbank_cons_fraud", "9999");
				resObject.put("br_id_nbank_cons_lost", "9999");
				resObject.put("br_id_nbank_finlea_fraud", "9999");
				resObject.put("br_id_nbank_finlea_lost", "9999");
				resObject.put("br_id_nbank_autofin_fraud", "9999");
				resObject.put("br_id_nbank_autofin_lost", "9999");
				resObject.put("br_id_nbank_other_fraud", "9999");
				resObject.put("br_id_nbank_other_lost", "9999");
				resObject.put("br_cell_bank_fraud", "9999");
				resObject.put("br_cell_bank_lost", "9999");
				resObject.put("br_cell_nbank_fraud", "9999");
				resObject.put("br_cell_nbank_lost", "9999");
				resObject.put("br_cell_nbank_nsloan_fraud", "9999");
				resObject.put("br_cell_nbank_nsloan_lost", "9999");
				resObject.put("br_cell_nbank_sloan_fraud", "9999");
				resObject.put("br_cell_nbank_sloan_lost", "9999");
				resObject.put("br_cell_nbank_cons_fraud", "9999");
				resObject.put("br_cell_nbank_cons_lost", "9999");
				resObject.put("br_cell_nbank_finlea_fraud", "9999");
				resObject.put("br_cell_nbank_finlea_lost", "9999");
				resObject.put("br_cell_nbank_autofin_fraud", "9999");
				resObject.put("br_cell_nbank_autofin_lost", "9999");
				resObject.put("br_cell_nbank_other_fraud", "9999");
				resObject.put("br_cell_nbank_other_lost", "9999");
				resObject.put("br_bank_bad_allnum", "9999");
				resObject.put("br_nbank_bad_allnum", "9999");
				resObject.put("br_nbank_nsloan_bad_allnum", "9999");
				resObject.put("br_nbank_sloan_bad_allnum", "9999");
				resObject.put("br_nbank_cons_bad_allnum", "9999");
				resObject.put("br_nbank_finlea_bad_allnum", "9999");
				resObject.put("br_nbank_autofin_bad_allnum", "9999");
				resObject.put("br_nbank_other_bad_allnum", "9999");
				resObject.put("br_court_bad_allnum", "9999");
				resObject.put("br_court_executed_allnum", "9999");
				resObject.put("br_flag_executionlimited", "9999");
				resObject.put("br_apply_payday_cnt_cell_30d", "9999");
				resObject.put("br_apply_payday_cnt_id_30d", "9999");
				resObject.put("br_m1_id_nbank_week_allnum", "9999");
				resObject.put("br_m6_id_nbank_nsloan_allnum", "9999");	
				resObject.put("br_apply_nmfin_cnt_id_7d", "9999");
				resObject.put("br_apply_nmfin_cnt_cell_7d", "9999");	
				resObject.put("br_m6_id_max_inteday", "9999");
				resObject.put("br_apply_nbank_avgcnt_id_m6", "9999");
				resObject.put("br_m6_id_nbank_cf_allnum", "9999");
				resObject.put("br_m6_id_nbank_max_inteday", "9999");
				resObject.put("br_m6_id_nbank_ca_allnum", "9999");
				resObject.put("br_m6_id_nbank_min_monnum", "9999");
				resObject.put("br_apply_nbank_avgcnt_cell_m6", "9999");
				resObject.put("br_m6_cell_max_inteday", "9999");
				resObject.put("br_apply_payday_orgcnt_id_15d", "9999");
				resObject.put("br_apply_payday_orgcnt_cell_15d", "9999");	
				resObject.put("br_apply_bank_orgcnt_id_m12", "9999");
				resObject.put("br_m12_id_nbank_max_inteday", "9999");
				resObject.put("br_m12_id_nbank_cons_orgnum", "9999");
				resObject.put("br_m12_id_nbank_nsloan_allnum", "9999");
				resObject.put("br_m12_id_nbank_ca_orgnum", "9999");
				resObject.put("br_apply_bank_orgcnt_cell_m12", "9999");
				resObject.put("br_m12_cell_nbank_max_inteday", "9999");
				resObject.put("br_lst_cell_nbank_inteday", "9999");
				resObject.put("br_m3_cell_pdl_allnum", "9999");
				
				resObject.put("br_m3_cell_nbank_allnum", "9999");
				resObject.put("br_m3_cell_nbank_week_allnum", "9999");
				resObject.put("br_m3_cell_nbank_avg_monnum", "9999");
				resObject.put("br_m3_id_nbank_min_monnum", "9999");
				resObject.put("br_m3_cell_max_inteday", "9999");		
				
				resObject.put("br_d7_id_nbank_p2p_allnum", "9999");
				resObject.put("br_d15_cell_nbank_ca_allnum", "9999");
				resObject.put("br_m3_id_nbank_oth_allnum", "9999");
				resObject.put("br_m3_id_nbank_p2p_orgnum", "9999");
				resObject.put("br_m3_cell_avg_monnum", "9999");
				resObject.put("br_m3_cell_max_monnum", "9999");
				resObject.put("br_m3_cell_nbank_p2p_orgnum", "9999");
				resObject.put("br_m3_cell_nbank_max_monnum", "9999");
				resObject.put("br_m6_cell_nbank_p2p_allnum", "9999");
				resObject.put("br_m6_id_nbank_p2p_allnum", "9999");
				resObject.put("br_m12_cell_nbank_ca_allnum", "9999");
				resTO.setResCode("1111");
				resTO.setResMsg("百融特殊名单验证接口返回数据异常");
			}
		} catch (Exception e) {
			log.info("调用百融特殊名单验证接口异常：{}", e);
			resTO.setResCode("1111");
			resTO.setResMsg("调用百融特殊名单验证接口异常");
			resObject.put("br_dishonest_idcard", "9999");
			resObject.put("br_enforced_idcard", "9999");
			resObject.put("br_id_bank_fraud", "9999");
			resObject.put("br_id_bank_lost", "9999");
			resObject.put("br_id_nbank_fraud", "9999");
			resObject.put("br_id_nbank_lost", "9999");
			resObject.put("br_id_nbank_nsloan_fraud", "9999");
			resObject.put("br_id_nbank_nsloan_lost", "9999");
			resObject.put("br_id_nbank_sloan_fraud", "9999");
			resObject.put("br_id_nbank_sloan_lost", "9999");
			resObject.put("br_id_nbank_cons_fraud", "9999");
			resObject.put("br_id_nbank_cons_lost", "9999");
			resObject.put("br_id_nbank_finlea_fraud", "9999");
			resObject.put("br_id_nbank_finlea_lost", "9999");
			resObject.put("br_id_nbank_autofin_fraud", "9999");
			resObject.put("br_id_nbank_autofin_lost", "9999");
			resObject.put("br_id_nbank_other_fraud", "9999");
			resObject.put("br_id_nbank_other_lost", "9999");
			resObject.put("br_cell_bank_fraud", "9999");
			resObject.put("br_cell_bank_lost", "9999");
			resObject.put("br_cell_nbank_fraud", "9999");
			resObject.put("br_cell_nbank_lost", "9999");
			resObject.put("br_cell_nbank_nsloan_fraud", "9999");
			resObject.put("br_cell_nbank_nsloan_lost", "9999");
			resObject.put("br_cell_nbank_sloan_fraud", "9999");
			resObject.put("br_cell_nbank_sloan_lost", "9999");
			resObject.put("br_cell_nbank_cons_fraud", "9999");
			resObject.put("br_cell_nbank_cons_lost", "9999");
			resObject.put("br_cell_nbank_finlea_fraud", "9999");
			resObject.put("br_cell_nbank_finlea_lost", "9999");
			resObject.put("br_cell_nbank_autofin_fraud", "9999");
			resObject.put("br_cell_nbank_autofin_lost", "9999");
			resObject.put("br_cell_nbank_other_fraud", "9999");
			resObject.put("br_cell_nbank_other_lost", "9999");
			resObject.put("br_bank_bad_allnum", "9999");
			resObject.put("br_nbank_bad_allnum", "9999");
			resObject.put("br_nbank_nsloan_bad_allnum", "9999");
			resObject.put("br_nbank_sloan_bad_allnum", "9999");
			resObject.put("br_nbank_cons_bad_allnum", "9999");
			resObject.put("br_nbank_finlea_bad_allnum", "9999");
			resObject.put("br_nbank_autofin_bad_allnum", "9999");
			resObject.put("br_nbank_other_bad_allnum", "9999");
			resObject.put("br_court_bad_allnum", "9999");
			resObject.put("br_court_executed_allnum", "9999");
			
			// 百融入库参数
			dataBaiRongInfoReqBO.setResCode("9999");
			dataBaiRongInfoReqBO.setResMsg("百融接口返回数据异常");
		}
		dataBaiRongInfoReqBO.setCreateTime(new Date());
		dataBaiRongInfoService.createDataBaiRongInfo(dataBaiRongInfoReqBO);
		resTO.setResData(resObject.toString());
		log.info("调用百融特殊名单验证接口返回结果：{}", JSONObject.toJSONString(resTO));
		return resTO;
	}

	@SuppressWarnings("unchecked")
	@PostConstruct
	@Override
	public void register() {
		registerToWsServiceFactory(this, BRSpecialListReqTO.class);
	}
 
	private void handleRequestParam(BRSpecialListReqTO req) {
		String attr = req.getAttr();
		switch (attr) {
		case "唯品会":
			req.setQueryModule("SpecialList_c,ExecutionLimited");
			break;
		case "苏宁":
			req.setQueryModule("SpecialList_c,ExecutionLimited");
			break;
		case "分期乐":
			req.setQueryModule("SpecialList_c,FraudRelation_g,ExecutionLimited");
			break;	
		case "大额":
			req.setQueryModule("SpecialList_c,FraudRelation_g,DebtRepayStress,ApplyLoanStr,ExecutionLimited");
			break;		
		default:
			req.setQueryModule("SpecialList_c,ExecutionLimited");
			break;
		}
		
	}
	
}
